]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Add localization
authorColin Walters <walters@verbum.org>
Fri, 24 Jul 2009 22:11:14 +0000 (18:11 -0400)
committerColin Walters <walters@verbum.org>
Fri, 14 Aug 2009 13:14:34 +0000 (09:14 -0400)
Infrastructure for localization; hook up intltool, create po/
and po/POTFILES.in.  We need to call bindtextdomain/bind_textdomain_codeset.

Switch to gnome-autogen.sh to call intltool.

Makefile.am
autogen.sh
configure.ac
po/LINGUAS [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
src/Makefile.am
src/gnome-shell-plugin.c

index 8105df56759df87547119f43b01210b46dfd6bcb..baf7dcb5a8c04882dae281ee0f948789e30cb8f9 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = data js src
+SUBDIRS = data js src po
 
 EXTRA_DIST =           \
        .project        \
index 9fd4a8d7fd564adfe681e3ba824b908c12a068d3..54b24b66de3fabf05b0ac605caf8cc148aa12ab9 100755 (executable)
@@ -1,8 +1,22 @@
-#!/bin/sh
-
-(cd `dirname $0`;
-    touch ChangeLog NEWS &&
-    autoreconf --install --symlink &&
-    autoreconf &&
-    ./configure --enable-maintainer-mode $@
-)
+#!/bin/bash
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+PKG_NAME="gnome-shell"
+REQUIRED_AUTOMAKE_VERSION=1.10
+
+(test -f $srcdir/configure.ac \
+  && test -d $srcdir/src) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level gnome-shell directory"
+    exit 1
+}
+
+which gnome-autogen.sh || {
+    echo "You need to install gnome-common from GNOME Subversion (or from"
+    echo "your OS vendor's package manager)."
+    exit 1
+}
+USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
index a93de64970057579b577afb9a367047678f62045..78d17a731822e6625889abbb6a24e64799450f0b 100644 (file)
@@ -22,6 +22,9 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
 
 PKG_PROG_PKG_CONFIG(0.16)
 
+IT_PROG_INTLTOOL(0.26)
+AM_GLIB_GNU_GETTEXT
+
 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
 AM_GCONF_SOURCE_2
 
@@ -120,4 +123,5 @@ AC_OUTPUT([
   js/misc/Makefile
   js/ui/Makefile
   src/Makefile
+  po/Makefile.in
 ])
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..7754f62
--- /dev/null
@@ -0,0 +1,5 @@
+js/ui/panel.js
+js/ui/overlay.js
+src/gdmuser/gdm-user.c
+src/shell-global.c
+src/shell-status-menu.c
index ca87573d5ad1a655b074abac584deab20c393fec..a050e9cd0084ea1590f75ea40f2da163bbd3b5b3 100644 (file)
@@ -28,7 +28,8 @@ gnome_shell_cflags =                          \
        $(MUTTER_PLUGIN_CFLAGS)                 \
         $(LIBGNOMEUI_CFLAGS)                    \
        -I$(srcdir)/tray                        \
-       -DGETTEXT_PACKAGE=gnome-shell           \
+       -DGETTEXT_PACKAGE=\"gnome-shell\"               \
+       -DLOCALEDIR=\"$(datadir)/locale\" \
        -DGNOME_SHELL_DATADIR=\"$(pkgdatadir)\" \
        -DGNOME_SHELL_PKGLIBDIR=\"$(pkglibdir)\" \
        -DJSDIR=\"$(pkgdatadir)/js\"
index a9e5d69da0dd81f2a5416e95f49fdb67f0f6ffbe..f816dadd778cc29d6f73b0972bf88e9f51c0ea39 100644 (file)
@@ -153,6 +153,9 @@ gnome_shell_plugin_constructed (GObject *object)
   ClutterBackend *backend;
   cairo_font_options_t *font_options;
 
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+
   /* Disable text mipmapping; it causes problems on pre-GEM Intel
    * drivers and we should just be rendering text at the right
    * size rather than scaling it. If we do effects where we dynamically